<template>
	<view class="content">
		<view v-for="(item,index) in list" :key="index">
			{{item}}
		</view>
		<button type="primary" @click="handleClick('八戒')">点击</button>
		<view >
			{{name}}
		</view>
		
		<text @click="toDetail">跳转detail页面</text>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:["北京","上海","广州","深圳"],
				name:""
			}
		},
		onLoad() {

		},
		methods: {
			handleClick(name){
				console.log(name);
				// console.log(id,"1111")
				this.name=name
			},
			//跳转detail页面
			toDetail(){
				uni.navigateTo({
					url:"/pages/detail/detail?id=1001"
				})
			}

		}
	}
</script>

<style scoped>

</style>
